<template>
  <sweet-multi-select v-model="city" style="width: 300px" :options="cityOptions" @change="change" placeholder="请选择城市"></sweet-multi-select>
</template>
<script>
export default {
  data() {
    return {
      cityOptions: [
        {
          label: '上海',
          value: 1
        },
        {
          label: '北京',
          value: 2
        },
        {
          label: '西安',
          value: 3
        },
        {
          label: '杭州',
          value: 4
        },
        {
          label: '广州',
          value: 5
        },
        {
          label: '南京',
          value: 6
        },
        {
          label: '苏州',
          value: 7
        },
        {
          label: '石家庄',
          value: 8
        },
        {
          label: '天津',
          value: 9
        },
        {
          label: '哈尔滨',
          value: 10
        }
      ],
      city: [1, 3, 6, 9]
    };
  },
  methods: {
    change(data) {
      console.log('select city:', data);
    }
  }
};
</script>
